﻿using System.Runtime.CompilerServices;
using WorkFlowDemo.Steps;
using WorkflowFramework;

namespace WorkFlowDemo.Flows
{
    public class MyWorkflow2 : WorkFlowBase
    {
        private readonly Step1 _step1;
        public override string Name => typeof(MyWorkflow2).Name;
        public MyWorkflow2(Step1 step1)
        {
            _step1 = step1;
        }
        public override void Build(IWorkFlowBuilder builder)
        {
            Executor = builder.AddStep(_step1)
                .AddStep(new Step3())
                .Build();
        }
    }
}
